<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./promise.js"></script>
</head>
<body>
    <h1>自定义Promise--添加resolve和reject静态方法</h1>
    <script>
        // 使用自定义的Promise
        //const p = Promise.resolve("ok");
        // const p = Promise.resolve(
        //     new Promise((resolve,reject)=>{
        //         reject("失败");
        //     })
        // );
        const p = Promise.resolve(Promise.reject("失败"));


        console.log(p);
        

    </script>
</body>
</html>